﻿using System.ComponentModel.Composition;
using ORM_Micro.Contracts;

namespace ORM_Micro
{
    public static class DefaultDataContext
    {
        [Import]
        private static IDataContext _current;

        /// <summary>
        /// Method allowing the use of provider-based DataContext automagically with MEF (if configured on your project)
        /// </summary>
        public static IDataContext Current
        {
            get
            {
                return _current;
            }
        }
    }
}